<!DOCTYPE html>
<html lang="en">
	<head>
		<include file="Index/head" />
	</head>

	<body>
		<include file="Index/header" />

		<div class="main-container" id="main-container">
			<script type="text/javascript">
				try{ace.settings.check('main-container' , 'fixed')}catch(e){}
			</script>

			<div class="main-container-inner">
				<a class="menu-toggler" id="menu-toggler" href="#">
					<span class="menu-text"></span>
				</a>

				<include file="Index/menu" />
				
				<div class="main-content">
					<include file="Index/nav" />

					<div class="page-content">
						
							<!-- /**
							 * 右侧页面begin
							 */ -->
								<div class="row">
									<div class="col-xs-12">
										<div class="table-header">
											用户反馈
										</div>

										<div class="table-responsive">
											<div id="sample-table-2_wrapper" class="dataTables_wrapper" role="grid">
											<div class="row">
											<div class="col-sm-6">
											<div id="sample-table-2_length" class="dataTables_length">

											</div>
											</div>
											<div class="col-sm-6" style="margin-bottom:-20px;">
											<div class="dataTables_filter" id="sample-table-2_filter">
											<label>搜索: <input type="text" aria-controls="sample-table-2">
											<a href="{:U('Admin/Sendmessage/create')}">
												<p style="margin-top:20px;"></p>
											</a>
											</label>
											</div>
											</div>
											</div>
											<table id="sample-table-2" class="table table-striped table-bordered table-hover dataTable" aria-describedby="sample-table-2_info" >
												<thead>
													<tr role="row"><th  role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" aria-label="Domain: activate to sort column ascending">ID</th>
													<th  role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" aria-label="Domain: activate to sort column ascending">联系方式</th>
													<th  role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" aria-label="Domain: activate to sort column ascending">用户名</th>
													<th role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" aria-label="Price: activate to sort column ascending">反馈内容</th><th  role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" aria-label="Clicks: activate to sort column ascending">反馈时间</th>
														<th class="hidden-480" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" aria-label="Status: activate to sort column ascending">状态</th>
														<th class="sorting_disabled" role="columnheader" rowspan="1" colspan="1" aria-label="" style="width:20%;">管理</th></tr>
												</thead>
						
											<volist name="list" id="vo">
											<tr class="odd">
												<td class=" ">
													{$vo.id}
												</td>
												<td class=" ">
													{$vo.contact}
												</td>
												<td class=" ">
													{$vo.username}
												</td>
												<td class=" ">
													{$vo.content}
												</td>
												<td class="">
													{$vo.ctime|date="Y-m-d H:i:s",###}
												</td>
												<td class="hidden-480 ">
													{$vo.adopt}
												</td>

												<td class=" ">
													<a href="javascript:take_on({$vo.id})">
														<div class="btn-group dropup">
															<button class="btn btn-xs btn-danger">采纳</button>
														</div>
													</a>
													<a href="javascript:del({$vo.id})">
														<div class="btn-group dropup">
															<button class="btn btn-xs btn-info">删除</button>
														</div>
													</a>
												</td>
											</tr>
											</volist>
											</tbody>
											</table>

											<div class="row">
												<div class="col-sm-6">
													<div class="dataTables_info" id="sample-table-2_info">Showing 1 to 10 of 23 entries</div>
												</div>
												<div class="col-sm-6">
													<div class="dataTables_paginate paging_bootstrap">
														<ul class="pagination">
															{$show}
														</ul>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
						</div>
							<!-- /**
							 * 右侧页面end
							 */ -->
					</div><!-- /.page-content -->
				</div>

			</div><!-- /.main-container-inner -->

			<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
				<i class="icon-double-angle-up icon-only bigger-110"></i>
			</a>
		</div><!-- /.main-container -->

		<include file="Index/footer" />
		<script type="text/javascript">
		function del(id){
			var r = confirm('确定删除该反馈?');
			if(r){

				var id = id;
				var url = "{:U('Admin/User/del_feedback')}";
				$.ajax({
					type:'post',
					url:url,
					data:{id:id},
					dataType:'json',
					success:function(data){
						if(data==1){

							window.location.href="{:U('Admin/User/feedback')}";
						}
					}
				});
			}else{
				return false;
			}
		}

		function take_on(id){
			var r = confirm('确定采纳该意见?');
			if(r){

				var id = id;
				var url = "{:U('Admin/User/take_on_feedback')}";
				$.ajax({
					type:'post',
					url:url,
					data:{id:id},
					dataType:'json',
					success:function(data){
						if(data==1){

							window.location.href="{:U('Admin/User/feedback')}";
						}
					}
				});
			}else{
				return false;
			}
		}
		</script>
	</body>
</html>
